<!-- http://localhost:8080/JavascriptAPI/localapi/v3.0.0/test/circleEditor-v1/pages/circle.html -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>autonavi的Hello, World</title>

<style type="text/css">
body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;}
</style>
<script type="text/javascript" src="../js/ajax-browser-min.js"></script>
<script type="text/javascript" src="../js/circleEditor1.js"></script>
<script type="text/javascript">
var mapObj,canvas,ctx,canvas2,ctx2,editor,index=true;

	function mapInit() {
		var opt = {
			zoom:13,//设置地图zoom级别
			center:new MMap.LngLat(116.397428,39.90923),//设置地图中心点	
			doubleClickZoom:true,//双击放大地图
			scrollwheel:true//鼠标滚轮缩放地图
	  	}
		 mapObj = new MMap.Map("map",opt);
		
	}
	function editCircle() {
			circle = new MMap.Circle({   
			   center:new MMap.LngLat("116.403322","39.900255"),// 圆心位置  
			   radius:1000, //半径  
			   strokeColor: "#F33", //线颜色  
			   strokeOpacity: 1, //线透明度  
			   strokeWeight: 3, //线粗细度  
			   fillColor: "#ee2200", //填充颜色  
			   fillOpacity: 0.35//填充透明度  
			   }); 
		
			mapObj.addOverlays(circle);
				editor=new MMap.CircleEditor(circle);
				editor.edit();
			
	}
	function cancle(){
		editor.cancle();
		
	}
	function c(){
		editor.close();
	}
	function o(){
		editor.edit();
	}
	var editor2;
	function m(){
			editor2=new MMap.PolylineEditor(polyline);
			editor2.edit();
	}
	function area(){
		alert(editor.getArea());
	}
</script>
</head>
<body onload="mapInit();">
<canvas style="display:none" width="1000px" height="1000px" id="can"></canvas>
<canvas style="display:none" width="1000px" height="1000px" id="can2"></canvas>
<input type="button" value="editor" onclick="editCircle();">
<input type="button" value="area" onclick="area();">

<div style="position:absolute;left:100px;top:100px;width:600px;height:600px"id="map"></div>

</body >
</html>

